package com.itheima.student.system07.entry;

import com.itheima.student.system07.caozuostudent.CaoZuoStudent;

import java.util.Scanner;

/*
学生管理系统 入口
 */
public class StudentEntry {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        CaoZuoStudent cz = new CaoZuoStudent();
        loop:
        while (true) {
            System.out.println("----------欢迎来到学生管理系统----------");
            System.out.println("1.添加学生:");
            System.out.println("2.删除学生:");
            System.out.println("3.修改学生:");
            System.out.println("4.查看学生:");
            System.out.println("5.退出");
            System.out.println("请输入你的选择:");
            String choice = sc.next();
            switch (choice) {
                case "1":
                    //System.out.println("1.添加学生:");
                   cz .addCaoZuoStudent();
                    break;
                case "2":
                    //System.out.println("2.删除学生:");
                    cz .removeCaoZuoStudent();
                    break;
                case "3":
                    //System.out.println("3.修改学生:");
                    cz .updateCaoZuoStudent();
                    break;
                case "4":
                   // System.out.println("4.查看学生:");
                    cz .findCaoZuoStudent();
                    break;
                case "5":
                    System.out.println("5.感谢您的使用!");
                    break loop;
                default:
                    System.out.println("您的输入有误,请重新输入:");
                    break;

            }
        }


    }
}
